project(kimg_iff)
set (kimg_iff_VERSION_MAJOR 0)
set (kimg_iff_VERSION_MINOR 1)
set (kimg_iff_VERSION_PATCH 0)
set(CMAKE_CXX_FLAGS "-Wmultichar")
find_package(KDE4 REQUIRED)

include_directories( ${KDE4_INCLUDES} )

set(kimg_iff_LIB_SRCS iff.cpp)

kde4_add_plugin(kimg_iff ${kimg_iff_LIB_SRCS})
	
target_link_libraries(kimg_iff  ${KDE4_KDECORE_LIBS} ${QT_QTGUI_LIBRARY})
	
	
install(TARGETS kimg_iff  DESTINATION ${PLUGIN_INSTALL_DIR}/plugins/imageformats/ )

install(FILES iff.desktop DESTINATION ${SERVICES_INSTALL_DIR}/qimageioplugins/ )

#use cpack --config CPackSourceConfig.cmake to make source zip archive
set(CPACK_SOURCE_GENERATOR "ZIP")
set(CPACK_SOURCE_IGNORE_FILES "/testimages/*;/CMakeLists.txt.user$;/.directory$")
set(CPACK_SOURCE_PACKAGE_FILE_NAME
  "${CMAKE_PROJECT_NAME}-${kimg_iff_VERSION_MAJOR}.${kimg_iff_VERSION_MINOR}.${kimg_iff_VERSION_PATCH}")
INCLUDE(CPack)
